package com.example.mybatisstudy1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mybatisstudy1.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


//@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from t_user where password = #{password}")
    List<User> selectByPassword(String password);

    @Select("select * from t_user where username=#{userName}")
    List<User> selectByUser(User user);

    List<User> selectByUser2(User user);
    IPage<User> selectPageByUser(Page<User> page,@Param("user") User user);

}
